Good morning, and welcome for computer graphics.
In this week, we are looking into rasterization.
On Monday, we spoke about the rasterization of lines, and I've shown you an algorithm
the Brazenham algorithm, which is optimized for efficiency that is able to rasterize lines
using integer arithmetics only, which is very advantageous if the algorithm is to be
implemented in hardware, for instance, or on cheap hardware where floating point is
more expensive and also requires more energy maybe than integer.
And today, but nevertheless, lines are not probably not the most important primitive
that we use in today's computer graphics because we don't want to draw these wireframe models
where the silhouettes of the objects are rasterized using lines, but we really want to draw filled
objects.
And this is what we look into today, polygon rasterization.
So whereas last week we were looking in how to rasterize such a line here, not last week
on Monday, today we fill primitives.
And the typical primitive we will look at are triangles because everything can be composed
from triangles.
So this is the most important part, in fact.
So if we want to describe our scenes, I already spoke about that, we typically have these
path objects, for instance.
All these objects can be decomposed into polygons.
So even the curves contain line segments.
They are just so small and so finely subdivided that we don't see that it's only a polygon
polygon.
But in the end, so all these primitives become polygons.
And such a polygon is simply described by a set of points, p1, p2, p3, p4, p5 in this
case.
Often we will also learn why these are ordered in a particular order clockwise or counterclockwise.
And every shape can be approximated by such a polygon and each such polygon can be subdivided
into triangles.
This is a process that we call triangulation.
Now it depends.
Some algorithm can handle polygons directly.
Others can only handle triangles.
And in that case, then every polygon first has to be subdivided into such triangles before
they can be rasterized.
And this subdividing into triangles is a process triangulation.
It's very simple if we have convex polygons like this here.
But if we have non-convex polygons, that alone is an interesting question.
We don't look into that for now.
But the important thing is we use triangles as primitives and sometimes also polygons.
And the algorithm that we speak about mostly today, the scanline rasterization algorithm
works on arbitrary polygons.
But in practice, GPUs that do most of these rasterization tasks only look at triangles
for good reasons.
We will also see that in the end.
OK.
So that's one issue.
The primitives that we want to rasterize.
And then there's another issue that I also want to speak about right now.
And we will maybe come back to this issue.
Presenters
Zugänglich über
Offener Zugang
Dauer
01:24:15 Min
Aufnahmedatum
2019-10-24
Hochgeladen am
2019-10-29 14:39:45
Sprache
de-DE